<template>
<div>
  <el-carousel :interval="4000" type="card" height="200px">
    <el-carousel-item v-for="item in imgList" :key="item.name">
<!--      <h3 class="medium">{{ item }}</h3>-->
      <img :src="item.src" style="height:100%;width:100%;" alt="图片丢失了" :title="item.title" />
    </el-carousel-item>
  </el-carousel>
  <button class="applybut" @click="goCluster">一键部署</button>
</div>
</template>

<style>
  .el-carousel__item h3 {
    color: #475669;
    font-size: 14px;
    opacity: 0.75;
    line-height: 200px;
    margin: 0;
  }
  
  .el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
  }
  
  .el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
  }
  
  .applybut{
    background-color:#008CBA; /* Green */
    border-radius: 4px;
    border: none;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 40px;
    width: 300px;
    height: 100px;
    margin-top: 6rem;
  }
</style>

<script>
export default {
  data() {
    return {
      imgList: [
        {
          name: "k8s",
          src: require("../../assets/image/k8s.png"),
          title: "k8s"
        },
        {
          name: "docker",
          src: require("../../assets/image/docker.jpg"),
          title: "docker"
        },
        {
          name: "django",
          src: require("../../assets/image/django.jpg"),
          title: "django"
        },
        {
          name: "vue",
          src: require("../../assets/image/vue.png"),
          title: "vue"
        }
      ]
    };
  },
  methods: {
    goCluster() {
      this.$router.push("/Cluster");
    }
  }
};
</script>